package com.icangya.DAO.impl;

import com.icangya.DAO.ILifePayDAO;
import com.icangya.domain.LiefpayDO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public class LifePayDAOImpl extends  BaseDAO<LiefpayDO> implements ILifePayDAO {


    Logger logger = LoggerFactory.getLogger(this.getClass());


    @Override
    public LiefpayDO getLiefpayDOByMerchant_order_sn(String merchant_order_sn) {

        String hql=" FROM LiefpayDO l where l.merchantOrderSn = ?";

        List<LiefpayDO> list=(List<LiefpayDO>) getHibernateTemplate().find(hql,merchant_order_sn);

        if(list.size()>0)
            return list.get(0);

        return null;
    }
}
